



load('electrolist.mat');
load('electrolis_listtentwenty_new.mat');
load('ERP_DATA.mat');
load('N400_Frontal.mat')
load('N400_OCC.mat')
load('LPP_Frontal.mat')
load('LPP_OCC.mat')
load('LPP_Frontal_time.mat')
load('LPP_OCC_time.mat')
load('N400_Frontal_time.mat')
load('N400_OCC_time.mat')

%N400_excell_data_headers
xls_file{1,1} = 'Frontal_cognetive_congrouent';
xls_file{1,2} = 'Frontal_cognetive_Incongrouent';
xls_file{1,3} = 'Frontal_emotional_congrouent';
xls_file{1,4} = 'Frontal_emotional_Incongrouent';
xls_file{1,5} = 'OCC_cognetive_congrouent';
xls_file{1,6} = 'OCC_cognetive_Incongrouent';
xls_file{1,7} = 'OCC_emotional_congrouent';
xls_file{1,8} = 'OCC_emotional_Incongrouent';

[out,stats,time_matrix,Log155] = Regression_IAT2_1(DATA,listtentwe2,electrolist,N400_Frontal);
for i = 1: length (out) ; for ii = 1:4 ; xls_file{i+1,ii}=out(i,ii); end ; end
[out,stats,time_matrix,Log155] = Regression_IAT2_1(DATA,listtentwe2,electrolist,N400_OCC);
for i = 1: length (out) ; for ii = 1:4 ; xls_file{i+1,ii+4}=out(i,ii); end ; end

xlswrite('N400_excell_data',xls_file)

%n400 time


%N400_excell_data_headers_time
xls_file{1,1} = 'Frontal_cognetive_congrouent_time';
xls_file{1,2} = 'Frontal_cognetive_Incongrouent_time';
xls_file{1,3} = 'Frontal_emotional_congrouent_time';
xls_file{1,4} = 'Frontal_emotional_Incongrouent_time';
xls_file{1,5} = 'OCC_cognetive_congrouent_time';
xls_file{1,6} = 'OCC_cognetive_Incongrouent_time';
xls_file{1,7} = 'OCC_emotional_congrouent_time';
xls_file{1,8} = 'OCC_emotional_Incongrouent_time';

[out,stats,time_matrix,Log155] = Regression_IAT2_1(DATA,listtentwe2,electrolist,N400_Frontal_time);
for i = 1: 16 ; for ii = 1:4 ; xls_file{i+1,ii}=out(i+30,ii); end ; end
[out,stats,time_matrix,Log155] = Regression_IAT2_1(DATA,listtentwe2,electrolist,N400_OCC_time);
for i = 1: 16 ; for ii = 1:4 ; xls_file{i+1,ii+4}=out(i+30,ii); end ; end

xlswrite('N400_excell_data_time',xls_file)

% LPP

%LPP_excell_data_headers
xls_file{1,1} = 'Frontal_cognetive_congrouent';
xls_file{1,2} = 'Frontal_cognetive_Incongrouent';
xls_file{1,3} = 'Frontal_emotional_congrouent';
xls_file{1,4} = 'Frontal_emotional_Incongrouent';
xls_file{1,5} = 'OCC_cognetive_congrouent';
xls_file{1,6} = 'OCC_cognetive_Incongrouent';
xls_file{1,7} = 'OCC_emotional_congrouent';
xls_file{1,8} = 'OCC_emotional_Incongrouent';

[out,stats,time_matrix,Log155] = Regression_IAT2_1(DATA,listtentwe2,electrolist,LPP_Frontal);
for i = 1: length (out) ; for ii = 1:4 ; xls_file{i+1,ii}=out(i,ii); end ; end
[out,stats,time_matrix,Log155] = Regression_IAT2_1(DATA,listtentwe2,electrolist,LPP_OCC);
for i = 1: length (out) ; for ii = 1:4 ; xls_file{i+1,ii+4}=out(i,ii); end ; end

xlswrite('LPP_excell_data',xls_file)


%LPP_excell_data_headers_Time

xls_file{1,1} = 'Frontal_cognetive_congrouent_time';
xls_file{1,2} = 'Frontal_cognetive_Incongrouent_time';
xls_file{1,3} = 'Frontal_emotional_congrouent_time';
xls_file{1,4} = 'Frontal_emotional_Incongrouent_time';
xls_file{1,5} = 'OCC_cognetive_congrouent_time';
xls_file{1,6} = 'OCC_cognetive_Incongrouent_time';
xls_file{1,7} = 'OCC_emotional_congrouent_time';
xls_file{1,8} = 'OCC_emotional_Incongrouent_time';

[out,stats,time_matrix,Log155] = Regression_IAT2_1(DATA,listtentwe2,electrolist,LPP_Frontal_time);
for i = 1: 16 ; for ii = 1:4 ; xls_file{i+1,ii}=out(i+30,ii); end ; end
[out,stats,time_matrix,Log155] = Regression_IAT2_1(DATA,listtentwe2,electrolist,LPP_OCC_time);
for i = 1: 16 ; for ii = 1:4 ; xls_file{i+1,ii+4}=out(i+30,ii); end ; end

xlswrite('LPP_excell_data_time',xls_file)
